package edu.lmu.cs.dhara.roflkode.entities;

import edu.lmu.cs.dhara.util.Log;

/**
 * The roflkode "WHIEL" statement.
 */
public class WhielControl extends LoopControl {
	private Expression condition;
    private boolean pretest;

    /**
     * Creates a while statement object.
     */
    public WhielControl(Expression condition, boolean pretest) {
    	this.condition = condition;
        this.pretest = pretest;
    }

    /**
     * Returns the condition.
     */
    public Expression getCondition() {
        return condition;
    }
    
    /**
     * Returns whether or not we are pretesting
     */
    public boolean isPretest() {
        return pretest;
    }

    /**
     * Analyzes this statement.
     */
    public void analyze(Log log, SymbolTable table, Function f, boolean inLoop) {
//        condition.analyze(log, table);
//        condition.assertBoolean("while_condition_not_boolean", log);
//        body.analyze(log, table, f, true);
    }
}
